class User < ActiveRecord::Base

  acts_as_authentic
  
  has_one :person
  accepts_nested_attributes_for :person

  def before_destroy
    v = self.person.visitor
    if v
      v.person_id = nil
      v.save
    end
    self.person.destroy
  end

end
